package com.hds.modules.app.service.impl;

import com.hds.common.utils.PageUtils;
import com.hds.modules.app.dao.MessageMainBodyDao;
import com.hds.modules.app.entity.MsgMainBody;
import com.hds.modules.app.service.MessageMainBodyService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Map;

@Service
public class MessageMainBodyServiceImpl implements MessageMainBodyService {
	/** The msg dao. */
	@Resource
	private MessageMainBodyDao messageMainBodyDao;
	
	@Override
	public void save(MsgMainBody msgMainBody) {
		// TODO Auto-generated method stub
//		if(msgMainBody!=null){
//			msgMainBody.setCreateTime(DateUtil.dateFormat("yyyy-MM-dd hh:mm:ss", new Date()));
//		}
		messageMainBodyDao.insert(msgMainBody);
	}

	@Override
	public void update(MsgMainBody msgMainBody) {
		messageMainBodyDao.updateById(msgMainBody);
	}

//	@Override
//	public PageInfo<MsgMainBody> listByPage(int currPage, int targPage, int pageSize) {
//		// TODO Auto-generated method stub
//		PageInfo<MsgMainBody> pageInfo = new PageInfo<MsgMainBody>();
//		pageInfo.setCurrPage(currPage);
//		pageInfo.setTargPage(targPage);
//		pageInfo.setPageSize(pageSize);
//		Result<MsgMainBody> result = messageMainBodyDao.listByPage(pageInfo);
//		pageInfo.setResult(result);
//
//		return pageInfo;
//	}
	

	@Override
	public MsgMainBody get(Integer id) {
		return messageMainBodyDao.selectById(id);
	}

	@Override
	public Integer queryMaxBatchByCompanyId(Integer companyId) {
		return null;
	}

	@Override
	public PageUtils queryPage(Map<String, Object> params) {
		return null;
	}

}
